import json

num_list = [1, 3, 4, 5]
with open('num_list1.json', 'w') as f:
    json.dump(num_list, f)
    # f.write(str(num_list))
with open('num_list1.json') as f:
    num_list = json.load(f)
    print(num_list, type(num_list))

data = {
    "name": 'gao',
    "age": 12
}
print(type(data))
new_data = json.dumps(data)
print(new_data, type(new_data))
load_data = json.loads(new_data)
print(load_data, type(load_data))
